<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>积分兑换</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="applicable-device" content="mobile">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes, width=device-width">
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="css/style.css">
	<script src="js/jquery.js"></script>
	<script type="text/javascript">
		function changeProduct(){
			$(".btn-orange").css('display','none');
			$.ajax({
				type: "post",
			 	url: "/personalcenter/exchangeproduct",
			 	data: {product:"电信宽带氮气加速瓶",expoints:"a"},
			    dataType: "json",
				success: function (data) {
			    	if(data.result==3){
			    		window.location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe643cc1b34aa8f25&redirect_uri=http%3a%2f%2fa6.189young.com%2fpersonalcenter%2fcheckuser&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
			    	}else{
			    		if(data.result==2){
			    			alert("请先认证young粉！");
			    			window.location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe643cc1b34aa8f25&redirect_uri=http%3a%2f%2fa6.189young.com%2fpersonalcenter%2fcheckuser&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
			    		}else{
			    			if(data.result==4){
			    				alert("积分不足，无法兑换！");
			    				$(".btn-orange").css('display','block');
			    			}else{
			    				if(data.result==0){
				    				window.location.href="goods_qr50.html";
				    			}else{
				    				alert("兑换失败！");
				    				$(".btn-orange").css('display','block');
				    			}
			    			}
			    		}
			    	}
			    }
			});
		}
	</script>
</head>
<body>
    <div class="page">

        <header class="base-header">
          <a href="javascript:history.go(-1);" class="btn-back posa">返回</a>
        </header>
        
        <div class="img-box goods-img-s"><img src="img/danqiping.jpg" alt=""></div>
        <div class="tc goods-confirm-info">同学！你将要兑换：<br>电信宽带氮气加速瓶<b class="t-orange">1</b>件<br>将消耗你的<b class="t-orange">50</b>积分</div>
          
       <!--  <div class="goods-confirm-form">
          实体商品信息表单
          <div class="login-raw"><input type="text" placeholder="请输入送货地址（必填）"></div>
          <div class="login-raw"><input type="text" placeholder="姓名"></div>
          <div class="login-raw"><input type="text" placeholder="电话"></div>
          实体商品信息表单 end
        </div> -->
          
        <div class="tc btn-block-two goods-confirm-btns">
          <a href="goods_50.html" class="btn btn-yellow">取 消</a>
          <a href="javascript:changeProduct();" class="btn btn-orange">确 认</a>
        </div>
        
    </div>

    <!--百度数据统计-->
    <script>var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src="https://hm.baidu.com/hm.js24866553cf6bdd25afcd437091f96447";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();</script>

</body>
</html>
















